/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.mycompany.pagoxusuario.entidades;


import java.io.Serializable;
import java.util.List;
import javax.persistence.Cacheable;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import org.hibernate.annotations.LazyCollection;
import org.hibernate.annotations.LazyCollectionOption;


@Entity
@Cacheable
public class TributoMulta implements Serializable {

	private static final long serialVersionUID = -1918683551211451197L;
	
	@Id @GeneratedValue
	private Long id1;
	private String tributomulta1;
	@OneToMany(mappedBy="Tributo")
        @LazyCollection(LazyCollectionOption.EXTRA)
        
        @Id @GeneratedValue
	private Long id2;
	private String tributomulta2;
	@OneToMany(mappedBy="Multa")
        @LazyCollection(LazyCollectionOption.EXTRA)
               
        
	private List<Pago> pagos;

    public Long getId1() {
        return id1;
    }

    public void setId1(Long id1) {
        this.id1 = id1;
    }

    public Long getId2() {
        return id2;
    }

    public void setId2(Long id2) {
        this.id2 = id2;
    }

    public String getTributomulta1() {
        return tributomulta1;
    }

    public void setTributomulta1(String tributomulta1) {
        this.tributomulta1 = tributomulta1;
    }

    public String getTributomulta2() {
        return tributomulta2;
    }

    public void setTributomulta2(String tributomulta2) {
        this.tributomulta2 = tributomulta2;
    }

    
    public List<Pago> getPagos() {
        return pagos;
    }

    public void setPagos(List<Pago> pagos) {
        this.pagos = pagos;
    }
	
	
        
/*	@Override
	public String toString() {
		return nombre1;
	}
	
	public Long getId() {
		return id1;
	}
	public void setId(Long id) {
		this.id1 = id;
	}
	public String getNombre1() {
		return nombre1;
	}
	public void setNombre(String nombre) {
		this.nombre1 = nombre;
	}
	
        public List<Pago> getPago() {
		return pagos;
	}
	public void setModelos(List<Pago> pagos) {
		this.pagos = pagos;
	}
        
   */     
           
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id1 == null) ? 0 : id1.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (!(obj instanceof TributoMulta))
			return false;
		TributoMulta other = (TributoMulta) obj;
		if (id1 == null) {
			if (other.id1 != null)
				return false;
		} else if (!id1.equals(other.id1))
			return false;
		return true;
	}
        
        
        
        
}

